package com.hzw.saas.web.admin.sys.param;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import com.hzw.saas.common.util.AccountValidatorUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 *  系统用户添加
 * </p>
 *
 * @author sonam
 * @since 2021/2/22 15:24
 */
@Data
@ApiModel(value = "系统用户添加参数")
public class SysUserAddParam {

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名", required = true)
    private String userName;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    /**
     * 电话号码
     */
    @NotBlank(message = "电话号码不能为空")
    @Pattern(regexp = AccountValidatorUtil.REGEX_MOBILE, message = "手机号码格式不正确")
    @ApiModelProperty(value = "手机号码", required = true)
    private String phoneNo;

    /**
     * 邮箱地址
     */
    @Pattern(regexp = AccountValidatorUtil.REGEX_EMAIL, message = "邮箱格式不正确")
    @ApiModelProperty(value = "邮箱地址", position = 5)
    private String email;
}
